package Example;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class MainMenu extends JPanel {
	static JButton button[];
	SubBeginJPanel subPan;
	SubOtherJPanel subPan2;
	ImageIcon img=new ImageIcon("icon/开始界面背景.jpg");
	Window win;
	MainMenu(Window win){
		subPan=new SubBeginJPanel();
		subPan2=new SubOtherJPanel();
		this.win=win;
		
		setLayout(new BorderLayout());
		setPreferredSize(new Dimension(1150,1000));
		subPan2.button.addActionListener(new GoLoginListener());
		subPan2.button1.addActionListener(new SelectRecordListener());
		subPan2.button2.addActionListener(new CutoverJPanelListener(this,Main.showPeople,false));
		
		add(new SubNullJPanel(),BorderLayout.WEST);
	    add(subPan);
		add(subPan2,BorderLayout.EAST);
		win.add(this,BorderLayout.NORTH);
		}
	
//	public void paintComponent(Graphics g)
//    {
//		
//		g.drawImage(img.getImage(),0,0,Main.win.getContentPane().getWidth(),Main.win.getContentPane().getHeight(),this);//0锟斤拷0锟斤拷锟斤拷锟斤拷锟斤拷锟较角碉拷位锟矫ｏ拷锟斤拷锟斤拷锟角达拷小锟斤拷锟斤拷锟斤拷锟斤拷小锟斤拷
//    }
}